home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
AAVERAGE.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
923b
|
43 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_AAverage( anArray ) --> nAverage
PARAMETERS:
anArray : Array of numeric values to average.
SHORT:
Get average value of a numeric array.
DESCRIPTION:
_AAverage() returns the average of the numeric elements given in anArray.
NIL elements are not factored into the average so the result reflects only
the average of actual values (inlcuding ZERO).
NOTE:
EXAMPLE:
LOCAL anNums1 := { 1,2,3,4,5,6,7 } // 4
LOCAL anNums2 := { 12.1,2.2,7.3,2.6,5.9,6.06,0.5 } // 5.24
i = _AAverage(anNums1)
j = _AAverage(anNums2)
Result:
i = 4
j = 5.237142857 (5.24 with SET DECIMALS TO 2)
******************************************************************************/